﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VoucherOutGeneralList.aspx.cs"
    Inherits="SalesManagement.Modules.Sales.VoucherOutGeneralList" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Viewport ID="ViewPort1" runat="server" Layout="RowLayout">
        <Items>
            <ext:Toolbar ID="tbMain" runat="server">
                <Items>
                    <ext:Button runat="server" ID="btnNew" Icon="PageAdd" Text="Tạo mới">
                        <ToolTips>
                            <ext:ToolTip ID="ToolTip9" runat="server" Title="Ctr+N">
                            </ext:ToolTip>
                        </ToolTips>
                        <%--    <Listeners>
                                    <Click Handler="BeforCheckNewClick();" />
                                </Listeners>--%>
                    </ext:Button>
                    <ext:ToolbarSeparator />
                    <ext:Button runat="server" ID="btnUpdate" Text="Sửa" Icon="PageEdit">
                    </ext:Button>
                    <ext:ToolbarSeparator />
                    <ext:Button runat="server" ID="btnDelete" Text="Xóa" Icon="Delete">
                        <ToolTips>
                            <ext:ToolTip ID="ToolTip8" runat="server" Title="Shift+Delete">
                            </ext:ToolTip>
                        </ToolTips>
                        <%--    <Listeners>
                                    <Click Handler="ConfigDeleteObject()" />
                                </Listeners>--%>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
            <ext:Panel ID="Panel0" runat="server" Frame="true" Height="100" Layout="ColumnLayout" Border="false">
                <Defaults>
                    <ext:Parameter Name="Anchor" Value="99%">
                    </ext:Parameter>
                </Defaults>
                <Items>
                    <ext:Panel ID="Panel1" runat="server" ColumnWidth="0.5" Layout="FormLayout" LabelWidth="100" Border="true">
                        <Defaults>
                            <ext:Parameter Name="Anchor" Value="99%">
                            </ext:Parameter>
                        </Defaults>
                        <Items>
                            <ext:TextField runat="server" ID="txtVoucherNo" FieldLabel="Số phiếu">
                            </ext:TextField>
                            <ext:DateField ID="dfDateFrom" runat="server" FieldLabel="Từ ngày" />
                            <ext:ComboBox ID="ComboBox5" runat="server" FieldLabel="Hạn thanh toán" Editable="false"
                                DataIndex="Title" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Panel2" runat="server" ColumnWidth="0.4" Layout="FormLayout" LabelWidth="70" Border="false">
                        <Defaults>
                            <ext:Parameter Name="Anchor" Value="99%">
                            </ext:Parameter>
                        </Defaults>
                        <Items>
                            <ext:ComboBox ID="cbCustomer" runat="server" FieldLabel="Khách hàng" Editable="false"
                                DataIndex="Title" />
                            <ext:DateField ID="dfDateTo" runat="server" FieldLabel="Đến ngày" />
                            <ext:ComboBox ID="cbBondNo" runat="server" FieldLabel="Nhân viên" Editable="false"
                                DataIndex="Title" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="pnlPackCenter" runat="server" Layout="VBoxLayout" ColumnWidth="0.1" Border="true">
                        <Defaults>
                            <ext:Parameter Name="margins" Value="0 0 5 0" Mode="Value" />
                        </Defaults>
                        <LayoutConfig>
                            <ext:VBoxLayoutConfig Padding="5" Align="Center" Pack="Center" />
                        </LayoutConfig>
                        <Items>
                            <ext:Button ID="btSearch" runat="server" Text="Tìm kiếm" Icon="Magnifier" FormBind="true"
                                Width="60" Height="30">
                                <Listeners>
                                    <Click Handler="SearchDocument()" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Panel>
            <ext:GridPanel ID="GridPanel1" runat="server" AutoExpandColumn="objCustomer" RowHeight="1"
                ColumnLines="true" Border="false">
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Reader>
                            <ext:JsonReader IDProperty="obj_ID">
                                <Fields>
                                    <ext:RecordField Name="obj_ID" />
                                    <ext:RecordField Name="objDateCreate" />
                                    <ext:RecordField Name="objCustomer" />
                                    <ext:RecordField Name="objMaturity" />
                                    <ext:RecordField Name="objEmployee" />
                                    <ext:RecordField Name="objTotal" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ColumnID="obj_ID" DataIndex="obj_ID" Header="Số phiếu" />
                        <ext:Column DataIndex="objDateCreate" Header="Ngày tạo" />
                        <ext:Column DataIndex="objCustomer" Header="Khách hàng" />
                        <ext:Column DataIndex="objMaturity" Header="Hạn thanh toán" />
                        <ext:Column DataIndex="objEmployee" Header="Nhân viên" />
                        <ext:Column DataIndex="objTotal" Header="Tổng tiền" />
                    </Columns>
                </ColumnModel>
                <BottomBar>
                <ext:PagingToolbar ID="pdgrnMain" runat="server" PageSize="10"></ext:PagingToolbar>
                </BottomBar>
            </ext:GridPanel>
            <ext:GridPanel ID="GridPanel2" runat="server" AutoExpandColumn="pro_name" Border="false"
                Height="170" ColumnLines="true">
                <Store>
                    <ext:Store ID="Store2" runat="server">
                        <Reader>
                            <ext:JsonReader IDProperty="pro_id">
                                <Fields>
                                    <ext:RecordField Name="pro_id" />
                                    <ext:RecordField Name="pro_name" />
                                    <ext:RecordField Name="pro_unit" />
                                    <ext:RecordField Name="pro_amount" />
                                    <ext:RecordField Name="pro_value" />
                                    <ext:RecordField Name="pro_cash" />
                                    <ext:RecordField Name="pro_VAT" />
                                    <ext:RecordField Name="pro_Acounting" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel2" runat="server">
                    <Columns>
                        <ext:Column ColumnID="pro_id" DataIndex="pro_id" Header="Mã hàng" />
                        <ext:Column DataIndex="pro_name" Header="Tên hàng" />
                        <ext:Column DataIndex="pro_unit" Header="Đơn vị tính" />
                        <ext:Column DataIndex="pro_amount" Header="Số lượng" />
                        <ext:Column DataIndex="pro_value" Header="Đơn giá" />
                        <ext:Column DataIndex="pro_cash" Header="Tổng tiền" />
                        <ext:Column DataIndex="pro_VAT" Header="VAT" />
                        <ext:Column DataIndex="pro_Acounting" Header="Chiết khấu" />
                    </Columns>
                </ColumnModel>
                <LoadMask ShowMask="true" />
            </ext:GridPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
